Operating systems are at the heart of all computer systems or computing devices. An operating system provides the environment in which software applications are designed to operate. To that end, the operating system manages and schedules the resources of the computer or device it resides in, and provides various function modules and interfaces that can be used by the applications to accomplish their tasks.
As a result of the great advancements in computer technologies, there are many different types of computing devices in common use nowadays. Examples of such devices include set-top boxes, video game boxes, and home gateways. Many of the computing devices do not run a full-fledged operating system like those developed for use on a regular computer. Instead, they have a run-time image of an operating system tailored to support only those functions and resources needed by the devices to serve their intended functions. Such an operating system run-time image, often called an “embedded operating system,” typically has a much smaller footprint than that of a regular operating system. The size of the embedded operating system is an important consideration for manufacturers of computing devices, because a smaller operating system image requires a reduced amount of storage medium and/or memory space to store and run it, allowing the devices to be made less expensive.
In many computing devices using embedded operating systems, the run-time image of the operating system is stored on a read-only medium, such as a CD-ROM or traditional “masked/OTP ROM”, and the device has no non-volatile writable storage medium. One problem with this arrangement is that during operation the operating system often needs to store state data such as registry entries, user preferences, URLs, etc., for later use. A recent trend is to derive embedded operating systems from operating systems for regular computers. As a result, an embedded operating system may expect to write state data onto a writable storage medium, as a regular operating system would do. This cannot be done, however, since the device does not have a writable storage medium. In the past, this problem was solved by using a component called a “write filter” to intercept the write commands and write the data into the random access memory (RAM) of the system. A major drawback of this approach is that all the state data stored in the RAM is flushed out and lost when the device is turned off. When the device is turned on again, all the state data have to be reentered.
Some computing devices have their embedded operating systems stored in a writable storage medium, such as flash memory or a magnetic disk. Storing the run-time image of the operating system in a writable medium allows the operating system to be updated or modified. For example, a set-top box may receive an updated version of the operating system image via a satellite or cable system and stores the image in the RAM for replacing the existing operating system image in the storage medium.
A conventional approach to handling the replacement of the old operating system with the new operating system is to use a second operating system that is provided for that specific purpose. This approach, however, has several significant drawbacks. First, it requires the main operating system be shut down in order to run the second operating system, which then overwrites the main operating system in the storage medium with the new image in the RAM. This process can take a significant amount of time. Many computing devices, however, are used in applications where they are not allowed to be shut down for the period of time required for this update operation. Second, the second operating system, like the main operating system, also has to be stored in the storage medium so that it can be used to boot the system. Even though it is typically smaller than the main operating system, it may still require a significant amount of storage space. This can be a concern when the cost of the storage medium is relatively high, as in the case of flash memory. Moreover, in the process of writing the new operating system image over the old one, the existing state data are typically lost.